﻿/*
 * @Autor: PK
 * @Date: 2021/12/25 15:31:SS
 */

using ShkSimulation.core.optimization.variable;
using ShkSimulation.core.template;

namespace ShkSimulation.core.optimization.impl {

	public class EvaluateResult {

		public double Valuation { get; set; }
		
		public Network Network { get; set; }
		
		public DecisionVariableVector<double> VariableVector { get; set; }

		public static EvaluateResult Create(DecisionVariableVector<double> variableVector, Network newNetwork, double valuation) {
			EvaluateResult result = new EvaluateResult();
			result.Network = newNetwork;
			result.VariableVector = variableVector;
			result.Valuation = valuation;
			return result;
		}
		
		public static bool operator >(EvaluateResult one, EvaluateResult two) {
			return one.Valuation > two.Valuation;
		}
		
		public static bool operator <(EvaluateResult one, EvaluateResult two) {
			return one.Valuation < two.Valuation;
		}

	}

}